{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b9355a66",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "535c6c15",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     语文\n",
       "1     数学\n",
       "2     英语\n",
       "3    计算机\n",
       "dtype: object"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course=[\"语文\",'数学','英语','计算机']\n",
    "data = pd.Series(data=course)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "8a1c247c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "语文      80\n",
       "数学      90\n",
       "英语      85\n",
       "计算机    100\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 002\n",
    "grades = {\"语文\":80,'数学':90,'英语':85,'计算机':100}\n",
    "data = pd.Series(data=grades)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "60204899",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[80, 90, 85, 100]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 003\n",
    "numbers = data.tolist()\n",
    "numbers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "a260226c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>grade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>语文</th>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>数学</th>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>英语</th>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>计算机</th>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     grade\n",
       "语文      80\n",
       "数学      90\n",
       "英语      85\n",
       "计算机    100"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 004\n",
    "df = pd.DataFrame(data, columns=['grade'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "fbfabaf0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "101    10.0\n",
       "102    20.0\n",
       "103    30.0\n",
       "104    40.0\n",
       "105    50.0\n",
       "106    60.0\n",
       "107    70.0\n",
       "108    80.0\n",
       "109    90.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "s = pd.Series(\n",
    "    np.arange(10,100,10),\n",
    "    index=np.arange(101, 110),\n",
    "    dtype='float'\n",
    ")\n",
    "\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "66ab1e12",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    1\n",
       "b    2\n",
       "c    3\n",
       "d    4\n",
       "dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 006\n",
    "s = pd.Series(\n",
    "    data=['001','002','003','004'],\n",
    "    index=list('abcd')\n",
    ")\n",
    "\n",
    "# s = s.astype(int)\n",
    "s = s.map(int)\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "1d11e49e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "语文      80\n",
       "数学      90\n",
       "英语      85\n",
       "计算机    100\n",
       "物理      88\n",
       "化学      95\n",
       "dtype: int64"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 007\n",
    "grades = {\"语文\":80,'数学':90,'英语':85,'计算机':100}\n",
    "data = pd.Series(data=grades)\n",
    "data = pd.concat([data, pd.Series({'物理': 88, '化学': 95})])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "1bf6463c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>course</th>\n",
       "      <th>grade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>语文</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>数学</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>英语</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>计算机</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  course  grade\n",
       "0     语文     80\n",
       "1     数学     90\n",
       "2     英语     85\n",
       "3    计算机    100"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 008\n",
    "grades = {\"语文\":80,'数学':90,'英语':85,'计算机':100}\n",
    "data = pd.Series(data=grades)\n",
    "\n",
    "df = data.reset_index()\n",
    "df.columns = ['course', 'grade']\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "949870f6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>姓名</th>\n",
       "      <th>性别</th>\n",
       "      <th>年龄</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>小张</td>\n",
       "      <td>男</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>小李</td>\n",
       "      <td>女</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>小王</td>\n",
       "      <td>男</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>小赵</td>\n",
       "      <td>女</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   姓名 性别  年龄\n",
       "0  小张  男  18\n",
       "1  小李  女  19\n",
       "2  小王  男  20\n",
       "3  小赵  女  21"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 009\n",
    "df = pd.DataFrame(\n",
    "    {\n",
    "        \"姓名\":[\"小张\",\"小李\",\"小王\",\"小赵\"],\n",
    "        \"性别\":[\"男\",\"女\",\"男\",\"女\"],\n",
    "        \"年龄\":[18,19,20,21]\n",
    "    }\n",
    ")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "0fab92b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>性别</th>\n",
       "      <th>年龄</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>姓名</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>小张</th>\n",
       "      <td>男</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>小李</th>\n",
       "      <td>女</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>小王</th>\n",
       "      <td>男</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>小赵</th>\n",
       "      <td>女</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   性别  年龄\n",
       "姓名       \n",
       "小张  男  18\n",
       "小李  女  19\n",
       "小王  男  20\n",
       "小赵  女  21"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 010\n",
    "df = pd.DataFrame(\n",
    "    {\n",
    "        \"姓名\":[\"小张\",\"小李\",\"小王\",\"小赵\"],\n",
    "        \"性别\":[\"男\",\"女\",\"男\",\"女\"],\n",
    "        \"年龄\":[18,19,20,21]\n",
    "    }\n",
    ")\n",
    "df.set_index('姓名', inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "f415a5cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2021-10-01', '2021-10-02', '2021-10-03', '2021-10-04',\n",
       "               '2021-10-05', '2021-10-06', '2021-10-07', '2021-10-08',\n",
       "               '2021-10-09', '2021-10-10', '2021-10-11', '2021-10-12',\n",
       "               '2021-10-13', '2021-10-14', '2021-10-15', '2021-10-16',\n",
       "               '2021-10-17', '2021-10-18', '2021-10-19', '2021-10-20',\n",
       "               '2021-10-21', '2021-10-22', '2021-10-23', '2021-10-24',\n",
       "               '2021-10-25', '2021-10-26', '2021-10-27', '2021-10-28',\n",
       "               '2021-10-29', '2021-10-30', '2021-10-31'],\n",
       "              dtype='datetime64[ns]', freq='D')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 011\n",
    "# date_range = pd.date_range(start='2021-10-01', end='2021-10-31', freq='D')\n",
    "date_range = pd.date_range(start='2021-10-01',periods=31)\n",
    "date_range"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "555a2348",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2021-01-04', '2021-01-11', '2021-01-18', '2021-01-25',\n",
       "               '2021-02-01', '2021-02-08', '2021-02-15', '2021-02-22',\n",
       "               '2021-03-01', '2021-03-08', '2021-03-15', '2021-03-22',\n",
       "               '2021-03-29', '2021-04-05', '2021-04-12', '2021-04-19',\n",
       "               '2021-04-26', '2021-05-03', '2021-05-10', '2021-05-17',\n",
       "               '2021-05-24', '2021-05-31', '2021-06-07', '2021-06-14',\n",
       "               '2021-06-21', '2021-06-28', '2021-07-05', '2021-07-12',\n",
       "               '2021-07-19', '2021-07-26', '2021-08-02', '2021-08-09',\n",
       "               '2021-08-16', '2021-08-23', '2021-08-30', '2021-09-06',\n",
       "               '2021-09-13', '2021-09-20', '2021-09-27', '2021-10-04',\n",
       "               '2021-10-11', '2021-10-18', '2021-10-25', '2021-11-01',\n",
       "               '2021-11-08', '2021-11-15', '2021-11-22', '2021-11-29',\n",
       "               '2021-12-06', '2021-12-13', '2021-12-20', '2021-12-27'],\n",
       "              dtype='datetime64[ns]', freq='W-MON')"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 012\n",
    "# date_range = pd.date_range(start='2021-01-01',end='2021-12-31', freq='W-MON')\n",
    "date_range = pd.date_range(start='2021-01-01',periods=52, freq='W-MON')\n",
    "\n",
    "date_range"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "a890b415",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2021-10-01 00:00:00', '2021-10-01 01:00:00',\n",
       "               '2021-10-01 02:00:00', '2021-10-01 03:00:00',\n",
       "               '2021-10-01 04:00:00', '2021-10-01 05:00:00',\n",
       "               '2021-10-01 06:00:00', '2021-10-01 07:00:00',\n",
       "               '2021-10-01 08:00:00', '2021-10-01 09:00:00',\n",
       "               '2021-10-01 10:00:00', '2021-10-01 11:00:00',\n",
       "               '2021-10-01 12:00:00', '2021-10-01 13:00:00',\n",
       "               '2021-10-01 14:00:00', '2021-10-01 15:00:00',\n",
       "               '2021-10-01 16:00:00', '2021-10-01 17:00:00',\n",
       "               '2021-10-01 18:00:00', '2021-10-01 19:00:00',\n",
       "               '2021-10-01 20:00:00', '2021-10-01 21:00:00',\n",
       "               '2021-10-01 22:00:00', '2021-10-01 23:00:00'],\n",
       "              dtype='datetime64[ns]', freq='h')"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 013\n",
    "date_range = pd.date_range(start='2021-10-01',periods=24, freq='h')\n",
    "# date_range = pd.date_range(start='2021-10-01', end='2021-10-02', freq='H', closed='left')\n",
    "# date_range = pd.date_range(start='2021-10-01', end='2021-10-02', freq='h', closed='left')\n",
    "\n",
    "date_range\n",
    "# pd.__version__\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "c5ee5e7a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>day</th>\n",
       "      <th>day_of_year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-10-01</td>\n",
       "      <td>274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-10-02</td>\n",
       "      <td>275</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-10-03</td>\n",
       "      <td>276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-10-04</td>\n",
       "      <td>277</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-10-05</td>\n",
       "      <td>278</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2021-10-06</td>\n",
       "      <td>279</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2021-10-07</td>\n",
       "      <td>280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2021-10-08</td>\n",
       "      <td>281</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2021-10-09</td>\n",
       "      <td>282</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2021-10-10</td>\n",
       "      <td>283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2021-10-11</td>\n",
       "      <td>284</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2021-10-12</td>\n",
       "      <td>285</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2021-10-13</td>\n",
       "      <td>286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2021-10-14</td>\n",
       "      <td>287</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2021-10-15</td>\n",
       "      <td>288</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2021-10-16</td>\n",
       "      <td>289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2021-10-17</td>\n",
       "      <td>290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2021-10-18</td>\n",
       "      <td>291</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2021-10-19</td>\n",
       "      <td>292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2021-10-20</td>\n",
       "      <td>293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2021-10-21</td>\n",
       "      <td>294</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2021-10-22</td>\n",
       "      <td>295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2021-10-23</td>\n",
       "      <td>296</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2021-10-24</td>\n",
       "      <td>297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2021-10-25</td>\n",
       "      <td>298</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2021-10-26</td>\n",
       "      <td>299</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2021-10-27</td>\n",
       "      <td>300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2021-10-28</td>\n",
       "      <td>301</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2021-10-29</td>\n",
       "      <td>302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2021-10-30</td>\n",
       "      <td>303</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2021-10-31</td>\n",
       "      <td>304</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          day  day_of_year\n",
       "0  2021-10-01          274\n",
       "1  2021-10-02          275\n",
       "2  2021-10-03          276\n",
       "3  2021-10-04          277\n",
       "4  2021-10-05          278\n",
       "5  2021-10-06          279\n",
       "6  2021-10-07          280\n",
       "7  2021-10-08          281\n",
       "8  2021-10-09          282\n",
       "9  2021-10-10          283\n",
       "10 2021-10-11          284\n",
       "11 2021-10-12          285\n",
       "12 2021-10-13          286\n",
       "13 2021-10-14          287\n",
       "14 2021-10-15          288\n",
       "15 2021-10-16          289\n",
       "16 2021-10-17          290\n",
       "17 2021-10-18          291\n",
       "18 2021-10-19          292\n",
       "19 2021-10-20          293\n",
       "20 2021-10-21          294\n",
       "21 2021-10-22          295\n",
       "22 2021-10-23          296\n",
       "23 2021-10-24          297\n",
       "24 2021-10-25          298\n",
       "25 2021-10-26          299\n",
       "26 2021-10-27          300\n",
       "27 2021-10-28          301\n",
       "28 2021-10-29          302\n",
       "29 2021-10-30          303\n",
       "30 2021-10-31          304"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 014\n",
    "date_range = pd.date_range(start='2021-10-01',periods=31)\n",
    "df = pd.DataFrame(data=date_range, columns=['day'])\n",
    "df['day_of_year'] = df['day'].dt.dayofyear\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "08ca034c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>norm</th>\n",
       "      <th>uniform</th>\n",
       "      <th>binomial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-01-01</th>\n",
       "      <td>-0.559365</td>\n",
       "      <td>0.042993</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-02</th>\n",
       "      <td>-1.765150</td>\n",
       "      <td>0.961961</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-03</th>\n",
       "      <td>-0.192148</td>\n",
       "      <td>0.555671</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-04</th>\n",
       "      <td>1.103041</td>\n",
       "      <td>0.018479</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-05</th>\n",
       "      <td>-0.683671</td>\n",
       "      <td>0.350679</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-23</th>\n",
       "      <td>0.834564</td>\n",
       "      <td>0.145117</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-24</th>\n",
       "      <td>-1.512309</td>\n",
       "      <td>0.927473</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-25</th>\n",
       "      <td>1.124666</td>\n",
       "      <td>0.017729</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-26</th>\n",
       "      <td>0.820045</td>\n",
       "      <td>0.727995</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-27</th>\n",
       "      <td>-0.561893</td>\n",
       "      <td>0.101595</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                norm   uniform  binomial\n",
       "2021-01-01 -0.559365  0.042993         0\n",
       "2021-01-02 -1.765150  0.961961         0\n",
       "2021-01-03 -0.192148  0.555671         0\n",
       "2021-01-04  1.103041  0.018479         0\n",
       "2021-01-05 -0.683671  0.350679         0\n",
       "...              ...       ...       ...\n",
       "2023-09-23  0.834564  0.145117         1\n",
       "2023-09-24 -1.512309  0.927473         1\n",
       "2023-09-25  1.124666  0.017729         0\n",
       "2023-09-26  0.820045  0.727995         0\n",
       "2023-09-27 -0.561893  0.101595         0\n",
       "\n",
       "[1000 rows x 3 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 015\n",
    "date_range = pd.date_range(start='2021-01-01',periods=1000)\n",
    "\n",
    "data = {\n",
    "    'norm': np.random.normal(loc=0, scale=1,size=1000),\n",
    "    'uniform': np.random.uniform(low=0, high=1,size=1000),\n",
    "    'binomial': np.random.binomial(n=1, p=0.2,size=1000)\n",
    "}\n",
    "df = pd.DataFrame(data=data, index=date_range)\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "ccf312e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>norm</th>\n",
       "      <th>uniform</th>\n",
       "      <th>binomial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2023-09-23</th>\n",
       "      <td>0.834564</td>\n",
       "      <td>0.145117</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-24</th>\n",
       "      <td>-1.512309</td>\n",
       "      <td>0.927473</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-25</th>\n",
       "      <td>1.124666</td>\n",
       "      <td>0.017729</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-26</th>\n",
       "      <td>0.820045</td>\n",
       "      <td>0.727995</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023-09-27</th>\n",
       "      <td>-0.561893</td>\n",
       "      <td>0.101595</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                norm   uniform  binomial\n",
       "2023-09-23  0.834564  0.145117         1\n",
       "2023-09-24 -1.512309  0.927473         1\n",
       "2023-09-25  1.124666  0.017729         0\n",
       "2023-09-26  0.820045  0.727995         0\n",
       "2023-09-27 -0.561893  0.101595         0"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(10)\n",
    "df.tail(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "c8d32350",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "DatetimeIndex: 1000 entries, 2021-01-01 to 2023-09-27\n",
      "Freq: D\n",
      "Data columns (total 3 columns):\n",
      " #   Column    Non-Null Count  Dtype  \n",
      "---  ------    --------------  -----  \n",
      " 0   norm      1000 non-null   float64\n",
      " 1   uniform   1000 non-null   float64\n",
      " 2   binomial  1000 non-null   int64  \n",
      "dtypes: float64(2), int64(1)\n",
      "memory usage: 31.2 KB\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>norm</th>\n",
       "      <th>uniform</th>\n",
       "      <th>binomial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1000.000000</td>\n",
       "      <td>1000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>-0.018755</td>\n",
       "      <td>0.493575</td>\n",
       "      <td>0.196000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>1.001957</td>\n",
       "      <td>0.289108</td>\n",
       "      <td>0.397167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-2.975858</td>\n",
       "      <td>0.000059</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-0.706756</td>\n",
       "      <td>0.252762</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>-0.006281</td>\n",
       "      <td>0.496466</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.680564</td>\n",
       "      <td>0.744861</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>2.908172</td>\n",
       "      <td>0.999869</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              norm      uniform     binomial\n",
       "count  1000.000000  1000.000000  1000.000000\n",
       "mean     -0.018755     0.493575     0.196000\n",
       "std       1.001957     0.289108     0.397167\n",
       "min      -2.975858     0.000059     0.000000\n",
       "25%      -0.706756     0.252762     0.000000\n",
       "50%      -0.006281     0.496466     0.000000\n",
       "75%       0.680564     0.744861     0.000000\n",
       "max       2.908172     0.999869     1.000000"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 017\n",
    "df.info()\n",
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "66e3d4cb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "binomial\n",
       "0    804\n",
       "1    196\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 018\n",
    "df['binomial'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "5552f83c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 019\n",
    "df.to_csv('分布数据.csv')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "54c93cea",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Index: 1000 entries, 2021-01-01 to 2023-09-27\n",
      "Data columns (total 3 columns):\n",
      " #   Column    Non-Null Count  Dtype  \n",
      "---  ------    --------------  -----  \n",
      " 0   norm      1000 non-null   float64\n",
      " 1   uniform   1000 non-null   float64\n",
      " 2   binomial  1000 non-null   int64  \n",
      "dtypes: float64(2), int64(1)\n",
      "memory usage: 31.2+ KB\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>norm</th>\n",
       "      <th>uniform</th>\n",
       "      <th>binomial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-01-01</th>\n",
       "      <td>-0.559365</td>\n",
       "      <td>0.042993</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-02</th>\n",
       "      <td>-1.765150</td>\n",
       "      <td>0.961961</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-03</th>\n",
       "      <td>-0.192148</td>\n",
       "      <td>0.555671</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-04</th>\n",
       "      <td>1.103041</td>\n",
       "      <td>0.018479</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-05</th>\n",
       "      <td>-0.683671</td>\n",
       "      <td>0.350679</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                norm   uniform  binomial\n",
       "2021-01-01 -0.559365  0.042993         0\n",
       "2021-01-02 -1.765150  0.961961         0\n",
       "2021-01-03 -0.192148  0.555671         0\n",
       "2021-01-04  1.103041  0.018479         0\n",
       "2021-01-05 -0.683671  0.350679         0"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 020\n",
    "df = pd.read_csv('分布数据.csv', index_col=0)\n",
    "df.info()\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "8d5fceb8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-09-30</td>\n",
       "      <td>456.0</td>\n",
       "      <td>464.6</td>\n",
       "      <td>453.8</td>\n",
       "      <td>461.4</td>\n",
       "      <td>17335451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-09-29</td>\n",
       "      <td>461.6</td>\n",
       "      <td>465.0</td>\n",
       "      <td>450.2</td>\n",
       "      <td>465.0</td>\n",
       "      <td>18250450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-09-28</td>\n",
       "      <td>467.0</td>\n",
       "      <td>476.2</td>\n",
       "      <td>464.6</td>\n",
       "      <td>469.8</td>\n",
       "      <td>20947276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-09-27</td>\n",
       "      <td>459.0</td>\n",
       "      <td>473.0</td>\n",
       "      <td>455.2</td>\n",
       "      <td>464.6</td>\n",
       "      <td>17966998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-09-24</td>\n",
       "      <td>461.4</td>\n",
       "      <td>473.4</td>\n",
       "      <td>456.2</td>\n",
       "      <td>460.2</td>\n",
       "      <td>16656914</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2021-09-23</td>\n",
       "      <td>460.2</td>\n",
       "      <td>469.6</td>\n",
       "      <td>456.4</td>\n",
       "      <td>463.2</td>\n",
       "      <td>22210868</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2021-09-21</td>\n",
       "      <td>446.0</td>\n",
       "      <td>453.8</td>\n",
       "      <td>443.2</td>\n",
       "      <td>450.0</td>\n",
       "      <td>16556875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2021-09-20</td>\n",
       "      <td>456.6</td>\n",
       "      <td>457.4</td>\n",
       "      <td>448.0</td>\n",
       "      <td>454.2</td>\n",
       "      <td>15513224</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2021-09-17</td>\n",
       "      <td>445.8</td>\n",
       "      <td>467.6</td>\n",
       "      <td>445.2</td>\n",
       "      <td>461.8</td>\n",
       "      <td>23982628</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2021-09-16</td>\n",
       "      <td>446.8</td>\n",
       "      <td>454.8</td>\n",
       "      <td>445.0</td>\n",
       "      <td>451.0</td>\n",
       "      <td>24519868</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Date   Open   High    Low  Close    Volume\n",
       "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
       "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
       "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n",
       "3  2021-09-27  459.0  473.0  455.2  464.6  17966998\n",
       "4  2021-09-24  461.4  473.4  456.2  460.2  16656914\n",
       "5  2021-09-23  460.2  469.6  456.4  463.2  22210868\n",
       "6  2021-09-21  446.0  453.8  443.2  450.0  16556875\n",
       "7  2021-09-20  456.6  457.4  448.0  454.2  15513224\n",
       "8  2021-09-17  445.8  467.6  445.2  461.8  23982628\n",
       "9  2021-09-16  446.8  454.8  445.0  451.0  24519868"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 021\n",
    "df = pd.read_csv('./00700.HK.csv')\n",
    "df.head(10)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "e504cf40",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 4267 entries, 0 to 4266\n",
      "Data columns (total 6 columns):\n",
      " #   Column  Non-Null Count  Dtype  \n",
      "---  ------  --------------  -----  \n",
      " 0   Date    4267 non-null   object \n",
      " 1   Open    4267 non-null   float64\n",
      " 2   High    4267 non-null   float64\n",
      " 3   Low     4267 non-null   float64\n",
      " 4   Close   4267 non-null   float64\n",
      " 5   Volume  4267 non-null   int64  \n",
      "dtypes: float64(4), int64(1), object(1)\n",
      "memory usage: 200.1+ KB\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>4267.000000</td>\n",
       "      <td>4267.000000</td>\n",
       "      <td>4267.000000</td>\n",
       "      <td>4267.000000</td>\n",
       "      <td>4.267000e+03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>211.010729</td>\n",
       "      <td>213.575773</td>\n",
       "      <td>208.063849</td>\n",
       "      <td>210.778935</td>\n",
       "      <td>1.198943e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>170.116303</td>\n",
       "      <td>172.173404</td>\n",
       "      <td>167.716394</td>\n",
       "      <td>169.807145</td>\n",
       "      <td>1.413407e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>3.375000</td>\n",
       "      <td>3.500000</td>\n",
       "      <td>3.375000</td>\n",
       "      <td>3.375000</td>\n",
       "      <td>4.523670e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>58.000000</td>\n",
       "      <td>59.200000</td>\n",
       "      <td>56.050000</td>\n",
       "      <td>57.500000</td>\n",
       "      <td>3.600698e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>170.900000</td>\n",
       "      <td>173.300000</td>\n",
       "      <td>168.000000</td>\n",
       "      <td>170.700000</td>\n",
       "      <td>7.647284e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>330.700000</td>\n",
       "      <td>333.100000</td>\n",
       "      <td>326.500000</td>\n",
       "      <td>330.000000</td>\n",
       "      <td>1.726551e+07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>767.000000</td>\n",
       "      <td>775.500000</td>\n",
       "      <td>751.500000</td>\n",
       "      <td>766.500000</td>\n",
       "      <td>4.397750e+08</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              Open         High          Low        Close        Volume\n",
       "count  4267.000000  4267.000000  4267.000000  4267.000000  4.267000e+03\n",
       "mean    211.010729   213.575773   208.063849   210.778935  1.198943e+07\n",
       "std     170.116303   172.173404   167.716394   169.807145  1.413407e+07\n",
       "min       3.375000     3.500000     3.375000     3.375000  4.523670e+05\n",
       "25%      58.000000    59.200000    56.050000    57.500000  3.600698e+06\n",
       "50%     170.900000   173.300000   168.000000   170.700000  7.647284e+06\n",
       "75%     330.700000   333.100000   326.500000   330.000000  1.726551e+07\n",
       "max     767.000000   775.500000   751.500000   766.500000  4.397750e+08"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 022\n",
    "df.info()\n",
    "\n",
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "b8722e08",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-09-30</td>\n",
       "      <td>456.0</td>\n",
       "      <td>464.6</td>\n",
       "      <td>453.8</td>\n",
       "      <td>461.4</td>\n",
       "      <td>17335451</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-09-29</td>\n",
       "      <td>461.6</td>\n",
       "      <td>465.0</td>\n",
       "      <td>450.2</td>\n",
       "      <td>465.0</td>\n",
       "      <td>18250450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-09-28</td>\n",
       "      <td>467.0</td>\n",
       "      <td>476.2</td>\n",
       "      <td>464.6</td>\n",
       "      <td>469.8</td>\n",
       "      <td>20947276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-09-27</td>\n",
       "      <td>459.0</td>\n",
       "      <td>473.0</td>\n",
       "      <td>455.2</td>\n",
       "      <td>464.6</td>\n",
       "      <td>17966998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-09-24</td>\n",
       "      <td>461.4</td>\n",
       "      <td>473.4</td>\n",
       "      <td>456.2</td>\n",
       "      <td>460.2</td>\n",
       "      <td>16656914</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2021-09-23</td>\n",
       "      <td>460.2</td>\n",
       "      <td>469.6</td>\n",
       "      <td>456.4</td>\n",
       "      <td>463.2</td>\n",
       "      <td>22210868</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2021-09-21</td>\n",
       "      <td>446.0</td>\n",
       "      <td>453.8</td>\n",
       "      <td>443.2</td>\n",
       "      <td>450.0</td>\n",
       "      <td>16556875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2021-09-20</td>\n",
       "      <td>456.6</td>\n",
       "      <td>457.4</td>\n",
       "      <td>448.0</td>\n",
       "      <td>454.2</td>\n",
       "      <td>15513224</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2021-09-17</td>\n",
       "      <td>445.8</td>\n",
       "      <td>467.6</td>\n",
       "      <td>445.2</td>\n",
       "      <td>461.8</td>\n",
       "      <td>23982628</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2021-09-16</td>\n",
       "      <td>446.8</td>\n",
       "      <td>454.8</td>\n",
       "      <td>445.0</td>\n",
       "      <td>451.0</td>\n",
       "      <td>24519868</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Date   Open   High    Low  Close    Volume\n",
       "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
       "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
       "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n",
       "3  2021-09-27  459.0  473.0  455.2  464.6  17966998\n",
       "4  2021-09-24  461.4  473.4  456.2  460.2  16656914\n",
       "5  2021-09-23  460.2  469.6  456.4  463.2  22210868\n",
       "6  2021-09-21  446.0  453.8  443.2  450.0  16556875\n",
       "7  2021-09-20  456.6  457.4  448.0  454.2  15513224\n",
       "8  2021-09-17  445.8  467.6  445.2  461.8  23982628\n",
       "9  2021-09-16  446.8  454.8  445.0  451.0  24519868"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 023\n",
    "df = pd.read_csv('./00700.HK.csv', index_col=0)\n",
    "df.head(10)\n",
    "# df.columns\n",
    "\n",
    "df.reset_index(inplace=True)\n",
    "df.head(10)\n",
    "# df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "89fe5f91",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>Year</th>\n",
       "      <th>Month</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-09-30</td>\n",
       "      <td>456.000</td>\n",
       "      <td>464.600</td>\n",
       "      <td>453.800</td>\n",
       "      <td>461.400</td>\n",
       "      <td>17335451</td>\n",
       "      <td>2021</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-09-29</td>\n",
       "      <td>461.600</td>\n",
       "      <td>465.000</td>\n",
       "      <td>450.200</td>\n",
       "      <td>465.000</td>\n",
       "      <td>18250450</td>\n",
       "      <td>2021</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-09-28</td>\n",
       "      <td>467.000</td>\n",
       "      <td>476.200</td>\n",
       "      <td>464.600</td>\n",
       "      <td>469.800</td>\n",
       "      <td>20947276</td>\n",
       "      <td>2021</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-09-27</td>\n",
       "      <td>459.000</td>\n",
       "      <td>473.000</td>\n",
       "      <td>455.200</td>\n",
       "      <td>464.600</td>\n",
       "      <td>17966998</td>\n",
       "      <td>2021</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-09-24</td>\n",
       "      <td>461.400</td>\n",
       "      <td>473.400</td>\n",
       "      <td>456.200</td>\n",
       "      <td>460.200</td>\n",
       "      <td>16656914</td>\n",
       "      <td>2021</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4262</th>\n",
       "      <td>2004-06-23</td>\n",
       "      <td>4.050</td>\n",
       "      <td>4.450</td>\n",
       "      <td>4.025</td>\n",
       "      <td>4.425</td>\n",
       "      <td>55016000</td>\n",
       "      <td>2004</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4263</th>\n",
       "      <td>2004-06-21</td>\n",
       "      <td>4.125</td>\n",
       "      <td>4.125</td>\n",
       "      <td>3.950</td>\n",
       "      <td>4.000</td>\n",
       "      <td>22817000</td>\n",
       "      <td>2004</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4264</th>\n",
       "      <td>2004-06-18</td>\n",
       "      <td>4.200</td>\n",
       "      <td>4.250</td>\n",
       "      <td>3.950</td>\n",
       "      <td>4.025</td>\n",
       "      <td>36598000</td>\n",
       "      <td>2004</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4265</th>\n",
       "      <td>2004-06-17</td>\n",
       "      <td>4.150</td>\n",
       "      <td>4.375</td>\n",
       "      <td>4.125</td>\n",
       "      <td>4.225</td>\n",
       "      <td>83801500</td>\n",
       "      <td>2004</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4266</th>\n",
       "      <td>2004-06-16</td>\n",
       "      <td>4.375</td>\n",
       "      <td>4.625</td>\n",
       "      <td>4.075</td>\n",
       "      <td>4.150</td>\n",
       "      <td>439775000</td>\n",
       "      <td>2004</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4267 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           Date     Open     High      Low    Close     Volume  Year  Month\n",
       "0    2021-09-30  456.000  464.600  453.800  461.400   17335451  2021      9\n",
       "1    2021-09-29  461.600  465.000  450.200  465.000   18250450  2021      9\n",
       "2    2021-09-28  467.000  476.200  464.600  469.800   20947276  2021      9\n",
       "3    2021-09-27  459.000  473.000  455.200  464.600   17966998  2021      9\n",
       "4    2021-09-24  461.400  473.400  456.200  460.200   16656914  2021      9\n",
       "...         ...      ...      ...      ...      ...        ...   ...    ...\n",
       "4262 2004-06-23    4.050    4.450    4.025    4.425   55016000  2004      6\n",
       "4263 2004-06-21    4.125    4.125    3.950    4.000   22817000  2004      6\n",
       "4264 2004-06-18    4.200    4.250    3.950    4.025   36598000  2004      6\n",
       "4265 2004-06-17    4.150    4.375    4.125    4.225   83801500  2004      6\n",
       "4266 2004-06-16    4.375    4.625    4.075    4.150  439775000  2004      6\n",
       "\n",
       "[4267 rows x 8 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 024\n",
    "df = pd.read_csv('./00700.HK.csv')\n",
    "df['Date'] = pd.to_datetime(df['Date'])\n",
    "df['Year'] = df['Date'].dt.year\n",
    "df['Month'] = df['Date'].dt.month\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "577216db",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Close</th>\n",
       "      <th>High</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2004</th>\n",
       "      <td>4.338686</td>\n",
       "      <td>4.434124</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005</th>\n",
       "      <td>6.568927</td>\n",
       "      <td>6.685223</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006</th>\n",
       "      <td>15.865951</td>\n",
       "      <td>16.151215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007</th>\n",
       "      <td>37.882724</td>\n",
       "      <td>38.826626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2008</th>\n",
       "      <td>54.818367</td>\n",
       "      <td>56.318776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>96.369679</td>\n",
       "      <td>98.023695</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>157.299598</td>\n",
       "      <td>159.507631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <td>189.737398</td>\n",
       "      <td>192.731707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>228.987045</td>\n",
       "      <td>231.430364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>337.136066</td>\n",
       "      <td>340.864754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>271.291498</td>\n",
       "      <td>275.137652</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>144.824291</td>\n",
       "      <td>146.708502</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>176.562041</td>\n",
       "      <td>178.113061</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>291.066667</td>\n",
       "      <td>293.847561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018</th>\n",
       "      <td>372.678862</td>\n",
       "      <td>377.493496</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019</th>\n",
       "      <td>346.225203</td>\n",
       "      <td>349.420325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020</th>\n",
       "      <td>479.141129</td>\n",
       "      <td>485.629435</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021</th>\n",
       "      <td>586.649189</td>\n",
       "      <td>597.197838</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Close        High\n",
       "Year                        \n",
       "2004    4.338686    4.434124\n",
       "2005    6.568927    6.685223\n",
       "2006   15.865951   16.151215\n",
       "2007   37.882724   38.826626\n",
       "2008   54.818367   56.318776\n",
       "2009   96.369679   98.023695\n",
       "2010  157.299598  159.507631\n",
       "2011  189.737398  192.731707\n",
       "2012  228.987045  231.430364\n",
       "2013  337.136066  340.864754\n",
       "2014  271.291498  275.137652\n",
       "2015  144.824291  146.708502\n",
       "2016  176.562041  178.113061\n",
       "2017  291.066667  293.847561\n",
       "2018  372.678862  377.493496\n",
       "2019  346.225203  349.420325\n",
       "2020  479.141129  485.629435\n",
       "2021  586.649189  597.197838"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAHcCAYAAAD85lEXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAABEbUlEQVR4nO3deViVdf7/8ReHVUAgF7ZUsMWUtLGwFJc0JcnQSaUxzcTMLA2bUVOTybT0m7Y5trk2jctX/WkuNbmkmZpNihtlY5KIhmkZuAWoBSJ8fn94cb6ewAU9ws3x+biu+7o89+c+5/15Ax5e3NtxM8YYAQAAWIitsicAAADwRwQUAABgOQQUAABgOQQUAABgOQQUAABgOQQUAABgOQQUAABgOQQUAABgOQQUAABgOQQUoAJ98cUXcnNz0xdffFHZU8EFvPTSS3Jzc6vsaVwz7dq1U7t27Sp7GsAlEVDg8jp16qQbbrhB2dnZpcZyc3MVFham5s2bq7i4uBJ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A/jtG3b1kgy06dPL/Uabdu2NW3btrU//te//mUkmX/84x+lti0uLnbKvIErwSEeXFdeeeUV1axZUzabTZMnT9aJEye0fv169ejRQydPntSxY8d07NgxHT9+XHFxccrIyNDPP/8s6dyhgJITaYuKinT8+HH5+/vrtttu09dff12qVt++fVWtWrVLzikxMVFbt2512J0+f/581a1bV23btr3k8+fPn69mzZrplltukSRVr15d8fHxDod5unfvLg8PDy1atMi+7rvvvlNaWprDVT+LFy9WmzZtdMMNN9i/FseOHVNsbKyKior05ZdfOtROSEhQ7dq1Hda5u7vb9xYVFxfrxIkTOnv2rJo1a+bwdVq9erU8PT01YMAA+zqbzaakpCSH1yvP96gsJYfWrvSk4VWrVkk6d5jwfCV7rFauXClJCgoKkiStWLFChYWFZb7W4sWLFRgYqPvvv9/h6xsdHS1/f/8yD4OV5bbbblPt2rVVv359Pf3007rlllu0cuVK+fr62rfx9vZWv379LvlaS5cuVa1atfTss8+WGis54dZZ8wbKg0M8uK4EBATotttu07FjxxQSEqJt27bJGKMXX3xRL774YpnPOXLkiG688UYVFxfr7bff1tSpU5WZmamioiL7NufvWi9Rv379y5rTI488oiFDhmj+/PkaM2aMcnNztWLFCg0dOvSSV2Tk5ORo1apVGjx4sPbt22df36pVKy1dulR79+5VgwYNVKtWLXXo0EEffvihxo8fL+nc4R0PDw91797d/ryMjAz997//LRU6zv9aXE6Pc+bM0aRJk7Rnzx6HX9bnb//jjz8qLCzM4ZeqJHvQKrFv377L/h6VJSAgQJJ08uRJe4gojx9//FE2m63UvEJDQxUUFKQff/xRktS2bVslJCTo5Zdf1uTJk9WuXTt17dpVjz76qLy9vSWd+/rm5uYqODj4gn1cjqVLlyogIECenp6qU6eO/TDM+W688cYyDyv+0f79+3XbbbfJw+PCvw6cNW+gPAgouK6VnPg5fPhwxcXFlblNyS+mCRMm6MUXX9QTTzyh8ePHq0aNGrLZbBoyZEiZ91C5nL0nknTDDTeoc+fO9oCyZMkSFRQU6LHHHrvkcxcvXqyCggJNmjR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U4NQ6NHjzYhISFm2LBhJioqygwcONDUrVvXzJs3z8yZM8fceOON5rXXXnNKrRtuuKHMxc3NzQQGBtofO8v57yeffPKJsdlsJjEx0UyZMsU8+eSTxsPDwyxbtsxp9erUqWO+/vprY4wxTz75pLnzzjvN119/bX7//Xezc+dO06JFC9O/f3+n1HJzczO33367cXNzMw0bNjRvvvmmOXLkiFNeuywJCQmmbdu2Zvny5aZHjx6mVatWpl27duann34yhw8fNnFxcaZr165OqfXGG2+Y8PBw8+6779r/EBk3bpz59NNPTZ8+fYyvr6/Zvn27U2oZY8zs2bONh4eH6dmzp5k1a5ZZtWqVWbVqlZk1a5bp1auX8fT0NHPnznVavYtx9h87JVw2oHh4eJgHHnjAvPTSS/Zl7NixxmazmWeeeca+zhnc3Nzsbyj333+/eeKJJxzG//a3v5n27ds7pZYxxnh7e9v/sm/QoIH59NNPHcY3btxo6tWr57R6bm5u5ueffzYfffSR6dKli/Hw8DC1a9c2zz33nNP/ggwLC7P/dZWVlWXc3NzMZ599Zh//6quvzI033ui0eg0bNjQLFy60P96+fbupU6eOKS4uNsYY88gjj5hu3bo5pVa9evXMokWLLji+cOFCU7duXafUMsaYbt26XXRp3769095UmjZtat5++23740WLFhk/Pz/7XiFnB5SbbrrJLF++3BhjTEZGhrHZbA7fx0WLFpnGjRs7pZa/v7+Jj483s2fPti+zZs0y7u7u5pVXXrGvc5bz309at25tRo0a5TD+yiuvmBYtWjitnre3tzlw4IAxxpjIyMhSf0zt2LHDhIWFOaVWSW87d+40gwcPNjVq1DBeXl6me/fuZtWqVfb/d85Su3Zt88033xhjjMnJyTFubm7mP//5j308NTXVhISEOKVWZGSkWbVqlf1xenq6qVmzpv2Pub/+9a/m/vvvd0otY4y59dZbzXvvvXfB8SlTpphbbrnFKbWGDh160eWxxx4joJTHV199ZW6++WYzZswYU1RUZF/v4eFhdu/e7dRa57+hhIWFmZSUFIfx7777ztSqVctp9SIiIsz69euNMcbceOONpVJ5Wlqa8fPzc1q98/szxpjDh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UQECA0/7DAQAA5/Oo7Alca2fPntXu3bsd0mVUVJQ8PT2rdC1Xr+fKvV1IYWGhfvnlF9WrV69C6p09e1aHDx+ukHoVWaui67lyb1LF/ly68teyontzCU4/aGQRRUVF5oUXXjBBQUH2Y7klS1BQkBk9erTD1T1VpZar13Pl3i7lWt1LwAr16I16VqtV0fWuRa0pU6aYDh06mL/85S/2m+2VOHr0qFNvnlaRtUq4bEAZMWKEqV27tpk+fbrJzMw0v/32m/ntt99MZmammTFjhgkODjYjR46scrVcvZ4r93YpvDlXzXqu3FtF16O3y/f2228bX19fk5SUZB577DHj5eVlJkyYYB935qX9FVnrfC57DkpoaKjmzJmjuLi4MsfXrFmjxMREZWdnV6larl7PlXu76667Ljr++++/a+/evU77LJmKrEdvVbO3iq5Hb87r7fbbb9cLL7ygRx99VJK0efNmde3aVQMHDtS4ceOUnZ2t8PBwp9SryFrnc9lzUE6ePKnw8PALjoeFhen06dNVrpar13Pl3tLS0tSzZ88LXnnyyy+/aO/evU6pVdH16K1q9lbR9ejNeb1lZmaqZcuW9sctW7bU+vXrFRsbq8LCQg0ZMqRK1nLg9H0yFvHggw+ajh07mqNHj5YaO3r0qHnggQdMfHx8lavl6vVcubfo6GgzderUC447+2ZHFVmP3qpmbxVdj96c11vdunXNl19+WWr97t27TUhIiElMTHRavYqsdT6X3YMyffp0PfjggwoLC1OTJk0UEhIiScrOztauXbsUFRWlFStWVLlarl7PlXtr1aqV0tPTLzhevXp13XvvvU6pVdH16K1q9lbR9ejNeb21bt1ay5YtU5s2bRzWR0VFad26dU69v0tF1jqfy56DIp2778maNWvKvIlNx44dZbPZqmQtV6/nyr0BgDP897//VWpqqvr161fm+HfffaelS5dq7NixVarW+Vw6oAAAgKrJZQ/xlNi2bZtSUlIc/jJu2bKl7r777ipdy9XrXW+9xcTE6J577nF6rYquR2/Us1qtiq5Hb07k9LNaLCI7O9u0bt3auLm5mYiICHPPPfeYe+65x0RERBg3NzfTunXrS35olRVruXo9eqM3q9Vz5d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sWqW3btvLx8dH8+fMro00A1wD3QQFwzXXt2lW5ubnq3r27xo8fr927d+v222/Xk08+qcTERP3+++96/vnndfbsWa1fv16StHTpUrm5uemOO+7QqVOnNGbMGB04cEA7d+6UzWbTgQMHVL9+fUVGRmrSpEm688475ePjo7CwsEruFoAzEFAAXHNHjhzR7bffrhMnTmjp0qX67rvv9J///Edr1qyxb/PTTz+pbt26Sk9PV4MGDUq9xrFjx1S7dm3t2rVLjRs3tgeUt956S3/7298qsh0AFYBDPACuueDgYD399NNq1KiRunbtqm+//VYbNmyQv7+/fWnYsKEk2Q/jZGRkqFevXrrpppsUEBCgyMhISSr1Ee/NmjWr0F4AVAyPyp4AgOuDh4eHPDzOveWcOnVKXbp00WuvvVZqu5JDNF26dFFERITef/99hYeHq7i4WI0bN9aZM2cctvfz87v2kwdQ4QgoACrcXXfdpaVLlyoyMtIeWs53/Phxpaen6/3331ebNm0kSV999VVFTxNAJeIQD4AKl5SUpBMnTqhXr17avn279u/frzVr1qhfv34qKirSDTfcoJo1a2rmzJnat2+f1q9fr2HDhlX2tAFUIAIKgAoXHh6uTZs2qaioSB07dlSTJk00ZMgQBQUFyWazyWazaeHChUpNTVXjxo01dOhQvfHGG5U9bQAViKt4AACA5bAHBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWA4BBQAAWM7/B4xOYUPLqgqtAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 025\n",
    "df.groupby('Year')['Close'].mean()\n",
    "df.groupby('Year')['Close'].mean().plot(kind='bar', title='Yearly Average Close Price')\n",
    "df.groupby('Year')[['Close','High']].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d4ef216e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>Volume</th>\n",
       "      <th>Year</th>\n",
       "      <th>Month</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>4240</th>\n",
       "      <td>2004-07-26</td>\n",
       "      <td>3.45</td>\n",
       "      <td>3.5</td>\n",
       "      <td>3.375</td>\n",
       "      <td>3.375</td>\n",
       "      <td>7439000</td>\n",
       "      <td>2004</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Date  Open  High    Low  Close   Volume  Year  Month\n",
       "4240 2004-07-26  3.45   3.5  3.375  3.375  7439000  2004      7"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 026\n",
    "df['Close'].min()\n",
    "df['Close'].argmin()\n",
    "# df.loc[df['Close'].argmin()]\n",
    "df.loc[[df['Close'].argmin()]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "f15456df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Open</th>\n",
       "      <th>High</th>\n",
       "      <th>Close</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-09-30</td>\n",
       "      <td>456.0</td>\n",
       "      <td>464.6</td>\n",
       "      <td>461.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-09-29</td>\n",
       "      <td>461.6</td>\n",
       "      <td>465.0</td>\n",
       "      <td>465.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-09-28</td>\n",
       "      <td>467.0</td>\n",
       "      <td>476.2</td>\n",
       "      <td>469.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-09-27</td>\n",
       "      <td>459.0</td>\n",
       "      <td>473.0</td>\n",
       "      <td>464.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-09-24</td>\n",
       "      <td>461.4</td>\n",
       "      <td>473.4</td>\n",
       "      <td>460.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2021-09-23</td>\n",
       "      <td>460.2</td>\n",
       "      <td>469.6</td>\n",
       "      <td>463.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2021-09-21</td>\n",
       "      <td>446.0</td>\n",
       "      <td>453.8</td>\n",
       "      <td>450.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2021-09-20</td>\n",
       "      <td>456.6</td>\n",
       "      <td>457.4</td>\n",
       "      <td>454.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2021-09-17</td>\n",
       "      <td>445.8</td>\n",
       "      <td>467.6</td>\n",
       "      <td>461.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2021-09-16</td>\n",
       "      <td>446.8</td>\n",
       "      <td>454.8</td>\n",
       "      <td>451.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Date   Open   High  Close\n",
       "0 2021-09-30  456.0  464.6  461.4\n",
       "1 2021-09-29  461.6  465.0  465.0\n",
       "2 2021-09-28  467.0  476.2  469.8\n",
       "3 2021-09-27  459.0  473.0  464.6\n",
       "4 2021-09-24  461.4  473.4  460.2\n",
       "5 2021-09-23  460.2  469.6  463.2\n",
       "6 2021-09-21  446.0  453.8  450.0\n",
       "7 2021-09-20  456.6  457.4  454.2\n",
       "8 2021-09-17  445.8  467.6  461.8\n",
       "9 2021-09-16  446.8  454.8  451.0"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 027\n",
    "new_df = df[['Date','Open','High','Close']]\n",
    "new_df.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "28e7fa65",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         Date   Open   High    Low  Close    Volume\n",
      "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
      "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
      "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n",
      "             Open   High    Low  Close    Volume\n",
      "Date                                            \n",
      "2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
      "2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
      "2021-09-28  467.0  476.2  464.6  469.8  20947276\n"
     ]
    }
   ],
   "source": [
    "# 028\n",
    "df = pd.read_csv('./00700.HK.csv')\n",
    "print(df.head(3))\n",
    "\n",
    "df.set_index('Date', inplace=True)\n",
    "print(df.head(3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "3c339840",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         Date   Open   High    Low  Close    Volume\n",
      "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
      "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
      "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n",
      "         Date   Open  Close    Volume\n",
      "0  2021-09-30  456.0  461.4  17335451\n",
      "1  2021-09-29  461.6  465.0  18250450\n",
      "2  2021-09-28  467.0  469.8  20947276\n"
     ]
    }
   ],
   "source": [
    "# 029\n",
    "df = pd.read_csv('./00700.HK.csv')\n",
    "print(df.head(3))\n",
    "\n",
    "df.drop(columns=['High','Low'], inplace=True)\n",
    "print(df.head(3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "1473e7ff",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         Date   Open   High    Low  Close    Volume\n",
      "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
      "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
      "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n",
      "            D      O      H      L      C         V\n",
      "0  2021-09-30  456.0  464.6  453.8  461.4  17335451\n",
      "1  2021-09-29  461.6  465.0  450.2  465.0  18250450\n",
      "2  2021-09-28  467.0  476.2  464.6  469.8  20947276\n"
     ]
    }
   ],
   "source": [
    "# 030\n",
    "df = pd.read_csv('./00700.HK.csv')\n",
    "print(df.head(3))\n",
    "\n",
    "# df.columns = ['D', 'O', 'H', 'L', 'C', 'V']\n",
    "df.rename(columns={'Date': 'D', 'Open': 'O', 'High': 'H', 'Low': 'L', 'Close': 'C', 'Volume': 'V'}, inplace=True)\n",
    "print(df.head(3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "2945ad1e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 7043 entries, 0 to 7042\n",
      "Data columns (total 21 columns):\n",
      " #   Column            Non-Null Count  Dtype  \n",
      "---  ------            --------------  -----  \n",
      " 0   customerID        7043 non-null   object \n",
      " 1   gender            7043 non-null   object \n",
      " 2   SeniorCitizen     7043 non-null   int64  \n",
      " 3   Partner           7043 non-null   object \n",
      " 4   Dependents        7043 non-null   object \n",
      " 5   tenure            7043 non-null   int64  \n",
      " 6   PhoneService      7043 non-null   object \n",
      " 7   MultipleLines     7043 non-null   object \n",
      " 8   InternetService   7043 non-null   object \n",
      " 9   OnlineSecurity    7043 non-null   object \n",
      " 10  OnlineBackup      7043 non-null   object \n",
      " 11  DeviceProtection  7043 non-null   object \n",
      " 12  TechSupport       7043 non-null   object \n",
      " 13  StreamingTV       7043 non-null   object \n",
      " 14  StreamingMovies   7043 non-null   object \n",
      " 15  Contract          7043 non-null   object \n",
      " 16  PaperlessBilling  7043 non-null   object \n",
      " 17  PaymentMethod     7043 non-null   object \n",
      " 18  MonthlyCharges    7043 non-null   float64\n",
      " 19  TotalCharges      7043 non-null   object \n",
      " 20  Churn             7043 non-null   object \n",
      "dtypes: float64(1), int64(2), object(18)\n",
      "memory usage: 1.1+ MB\n"
     ]
    }
   ],
   "source": [
    "# 031\n",
    "df = pd.read_csv('./WA_Fn-UseC_-Telco-Customer-Churn.csv')\n",
    "df.head(3)\n",
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "15cd7905",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
